
rem
bbdoc: TRenderForm component.
about: When an entity is added to the rendersystem, it will create
a TRenderable using the settings from this component.
This TRenderable is stored in the render system by entity id.
endrem
Type TRenderFormComponent Extends TComponent Final

	'image and group name
	'in TResources
	Field _imageLabel:String
	Field _imageGroup:String

	'frame to render
	Field _imageFrame:Int
	
	'render layer
	Field _layer:Int
	
	
	Function Create:TRenderFormComponent(label:String, group:String, imageFrame:Int, layer:Int)
		Local r:TRenderFormComponent = New TRenderFormComponent
		r._imageLabel = label.ToLower()
		r._imageGroup = group.ToLower()
		r._imageFrame = imageFrame
		r._layer = layer
		Return r
	End Function
	

	'returns the label the image is stored in in the resource manager.
	Method GetImageName:String()
		Return _imageLabel
	End Method
	
	'returns the group the image is stored in in the resource manager.
	Method GetImageGroup:String()
		Return _imageGroup
	End Method
	
	
	'returns the render layer in which to draw the renderable.
	Method GetLayer:Int()
		Return _layer
	End Method

	'returns the image frame.
	Method GetImageFrame:Int()
		Return _imageFrame
	End Method
	
End Type
